static void gdk_wayland_window_configure (GdkWindow *window,
int width,
- int height);
+ int height,
+ int scale);
GType _gdk_window_impl_wayland_get_type (void);
static void
gdk_wayland_window_update_size (GdkWindow *window,
int32_t width,
- int32_t height)
+ int32_t height,
+ int scale)
{
GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
GdkRectangle area;
window->width = width;
window->height = height;
+ impl->scale = scale;
if (impl->egl_window)
wl_egl_window_resize (impl->egl_window, width, height, 0, 0);
scale = MAX (scale, output_scale);
}
- if (scale != impl->scale)
- {
- impl->scale = scale;
-
- /* Notify app that scale changed */
- gdk_wayland_window_configure (window, window->width, window->height);
- }
+ /* Notify app that scale changed */
+ gdk_wayland_window_configure (window,
+ window->width, window->height,
+ scale);
}
static void
static void
gdk_wayland_window_configure (GdkWindow *window,
int width,
- int height)
+ int height,
+ int scale)
{
+ GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
GdkDisplay *display;
GdkEvent *event;
- if (window->width == width && window->height == height)
+ if (window->width == width &&
+ window->height == height &&
+ impl->scale == scale)
return;
event = gdk_event_new (GDK_CONFIGURE);
event->configure.width = width;
event->configure.height = height;
- gdk_wayland_window_update_size (window, width, height);
+ gdk_wayland_window_update_size (window, width, height, scale);
_gdk_window_update_size (window);
display = gdk_window_get_display (window);
&width,
&height);
- gdk_wayland_window_configure (window, width, height);
+ gdk_wayland_window_configure (window, width, height, impl->scale);
}
wl_array_for_each(p, states)
gint width,
gint height)
{
+ GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
+
if (with_move)
{
- GdkWindowImplWayland *impl;
-
- impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
-
/* Each toplevel has in its own "root" coordinate system */
if (GDK_WINDOW_TYPE (window) != GDK_WINDOW_TOPLEVEL)
{
* just move the window - don't update its size
*/
if (width > 0 && height > 0)
- gdk_wayland_window_configure (window, width, height);
+ gdk_wayland_window_configure (window, width, height, impl->scale);
}
static void
(impl->margin_left + impl->margin_right) + (left + right);
new_height = window->height -
(impl->margin_top + impl->margin_bottom) + (top + bottom);
- gdk_wayland_window_configure (window, new_width, new_height);
+ gdk_wayland_window_configure (window, new_width, new_height, impl->scale);
impl->margin_left = left;
impl->margin_right = right;